﻿import request from '/@/utils/request';
enum Api {
  AddDeviceTriggerHistory = '/api/deviceTriggerHistory/add',
  DeleteDeviceTriggerHistory = '/api/deviceTriggerHistory/delete',
  UpdateDeviceTriggerHistory = '/api/deviceTriggerHistory/update',
  PageDeviceTriggerHistory = '/api/deviceTriggerHistory/page',
  DetailDeviceTriggerHistory = '/api/deviceTriggerHistory/detail',
  GetDeviceInfoDeviceIdDropdown = '/api/deviceTriggerHistory/DeviceInfoDeviceIdDropdown',
}

// 增加触发历史
export const addDeviceTriggerHistory = (params?: any) =>
	request({
		url: Api.AddDeviceTriggerHistory,
		method: 'post',
		data: params,
	});

// 删除触发历史
export const deleteDeviceTriggerHistory = (params?: any) => 
	request({
			url: Api.DeleteDeviceTriggerHistory,
			method: 'post',
			data: params,
		});

// 编辑触发历史
export const updateDeviceTriggerHistory = (params?: any) => 
	request({
			url: Api.UpdateDeviceTriggerHistory,
			method: 'post',
			data: params,
		});

// 分页查询触发历史
export const pageDeviceTriggerHistory = (params?: any) => 
	request({
			url: Api.PageDeviceTriggerHistory,
			method: 'post',
			data: params,
		});

// 详情触发历史
export const detailDeviceTriggerHistory = (id: any) => 
	request({
			url: Api.DetailDeviceTriggerHistory,
			method: 'get',
			data: { id },
		});

export const getDeviceInfoDeviceIdDropdown = () =>
		request({
		url: Api.GetDeviceInfoDeviceIdDropdown,
		method: 'get'
		});

